package com.whale.controllers;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.whale.constants.MenuGroupConstants;

@Controller
@RequestMapping(value = "/embassies")
public class EmbassiesController extends AbstractController {

	@RequestMapping(method = RequestMethod.GET)
	public String getListEmbassy(Model model) {
		populateNavigation(model, "/embassies", MenuGroupConstants.USER_MENU_GROUP_ID);
		return "embassies/listEmbassy";
	}

	@RequestMapping(value = "{embassyId}", method = RequestMethod.GET)
	public String getEmbassy(@PathVariable String embassyId, Model model) {
		populateSubNavigation(model, "/embassies", embassyId, MenuGroupConstants.USER_MENU_GROUP_ID);
		return "embassies/embassyView";
	}
}
